<?php

namespace Sffi\ElementPlus\ElList;

use Sffi\ElementPlus\entity\Option;
use Sffi\ElementPlus\entityTrait\SelectOption;

class ElSelect extends Column
{
    use SelectOption;
    protected bool $isSelect = true;

    public function __construct(string $title, string $key, string $dataKey, int $width = 120)
    {
        parent::__construct($title, $key, $dataKey, $width);
    }

    public function addOptionByArgs(string $key, string $value,bool $disabled=false, $children=[])
    {
        return $this->addOption(new Option($key, $value, $disabled, $children));
    }
}